home *** CD-ROM | disk | FTP | other *** search
- /* Decodes all messages in the folder with munpack 1.5 which is available from Aminet */
- options results
- call addlib('rexxreqtools.library',0,-30,0)
- call addlib('rexxsupport.library',0,-30,0)
-
- /* Change the screen name if you want the requester to appear on some other screen */
- tags='rtfi_flags=freqf_nofiles rt_pubscrname=SCREEN'
- OpenWindow='yes' /* if yes, a console window is opened */
- DelPattern='#?.desc' /* Files in output dir matching this pattern will be deleted */
- /* Use standard AmigaDos patterns, for example ~(#?.rexx) */
- /* deletes everything else than rexx scripts */
-
- address 'YAM'
- 'GetMailInfo Act'
- act=result
- 'GetFolderInfo Max'
- last=result-1
- first=0
-
- 'request "Which messages should be decoded?" "_All|Ab_ove|_This|_Below|_Quit"'
- if result=0 then exit
- if result=2 then last=act
- if result=3 then do
- first=act
- last=act
- end
- if result=4 then first=act
-
- OutDir=rtfilerequest('T:','','Select a directory','_Decode',tags)
- if OutDir='' then exit
-
- /* If you do not want a window, change the variable OpenWindow in the beginning*/
- if upper(OpenWindow)='YES' then do
- Call Close(STDOUT)
- Call Close(STDIN)
- Call Open(STDOUT,'CON:1/11/638/130/DecodeFolder.rexx Output /CLOSE/WAIT/SCREEN'scrn,'w')
- Call Pragma('*',STDOUT)
- Call Open(STDIN,'*')
- end
- if upper(OpenWindow)='YES' then say 'Decoding messages from' first 'to' last
-
- do m=first to last
- 'SetMail' m
- 'GetMailInfo file'
- address command 'munpack' result '-C' OutDir
- address command 'delete' OutDir || DelPattern
- end
-
- say
- if upper(OpenWindow)='YES' then say 'All done, you can close the window'
-
- 'SetMail' act
-